package com.example.securitydemo2.service;

import com.example.securitydemo2.entity.UserInfo;
import com.example.securitydemo2.mapper.UserInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserInfoService {
    @Autowired
    private UserInfoMapper mapper;

    public UserInfo getUserInfo(String username){
        return mapper.getUserInfoByUsername(username);
    }

    public List<UserInfo> getAll(){

        return mapper.getAll();
    }

}
